from skillchallenge.models import *
from skillchallenge.game import *

Tick.objects.all().delete()
Config.objects.all().delete()
Name.objects.all().delete()
Skill.objects.all().delete()
Location.objects.all().delete()
Event.objects.all().delete()
Code.objects.all().delete()
Message.objects.all().delete()
Character.objects.all().delete()
Item.objects.all().delete()
SkillFeature.objects.all().delete()
SkillChallenge.objects.all().delete()
SkillTest.objects.all().delete()

game = Game()

Config.objects.create(max_skills=2)

Name.objects.create(text = 'joao')
Name.objects.create(text = 'jose')
Name.objects.create(text = 'maria')

Skill.objects.create(name = 'skill 1')
Skill.objects.create(name = 'skill 2')
Skill.objects.create(name = 'skill 3')
Skill.objects.create(name = 'skill 4')
Skill.objects.create(name = 'skill 5')

i1 = game.location_engine.create_location('initial 1', 'initial 1 desc', True)
i2 = game.location_engine.create_location('initial 2', 'initial 2 desc', True)

l1 = game.location_engine.create_location('location 3', 'location 3 desc')
l2 = game.location_engine.create_location('location 4', 'location 4 desc')
l3 = game.location_engine.create_location('location 5', 'location 5 desc')
l4 = game.location_engine.create_location('location 6', 'location 6 desc')
l5 = game.location_engine.create_location('location 7', 'location 7 desc')

game.location_engine.create_path(i1, l1)
game.location_engine.create_path(l1, i1)
game.location_engine.create_path(l1, l2)
game.location_engine.create_path(l2, l1)
game.location_engine.create_path(l2, l3)